<script>on mousedownglobal hthingput the rect of bg field "map" into origput bg field "map" into mapput map into cd field "before"repeat while the mouse is downput the mouseloc into coords-- put trunc((item 1 of coords - item 1 of orig)/5+.2) into x-- put trunc((item 2 of coords - item 2 of orig)/9+.9) into yput trunc((item 1 of coords - item 1 of orig)/5+.2) into xput trunc((item 2 of coords - item 2 of orig)/6+.9) into yif x>=1 and x<=104 and y >=1 and y<=52 thenput hthing into char x of line y of map--put map into bg field "map"end ifend repeatlock screenput map into bg field "map"if "*" is in map thenput item 1 of FindinField(map,"*","true",0) into pillput 0 into crepeat until pill = 0add 1 to cput item 1 of FindinField(map,"*","true",pill) into pillend repeatif c > 16 thenbeepanswer "error: Can't have more than 16 Pillboxes (I count " & c&")." with "OK"end ifend ifif "+" is in map thenput item 1 of FindinField(map,"+","true",0) into baseput 0 into crepeat until base = 0add 1 to cput item 1 of FindinField(map,"+","true",base) into baseend repeatif c > 16 thenbeepanswer "error: Can't have more than 16 Bases (I count " & c&")." with "OK"end ifend ifunlock screenend mousedown</script>